package com.usian.common.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @TODO:
 * @Author:baimu
 * @Date:2023 11 22 15 46
 **/

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class ResultCommonVo {

    private Integer code;
    private String message;

    private Object data;

    public static ResultCommonVo success(Object data){
        ResultCommonVo resultCommonVo = new ResultCommonVo(1, "SUCCESS", data);
        return resultCommonVo;
    }

    public static ResultCommonVo error(Object data){
        ResultCommonVo resultCommonVo = new ResultCommonVo(0, "ERROR", data);
        return resultCommonVo;
    }





}
